#include "Clock.h"
#include "../bitpointer/BitPointer.h"

#include<stdio.h>

int main()
{
	printf("Now Testing the clock\n");
	unsigned char b = 0x00;
	BitPointer bit = BitPointer(&b, 0);
	Clock clock = Clock(5, bit);
	for(int i = 0; i < 4; i++)
	{
		for(int j = 0; j < 5; j++)
		{
			clock.run();
			printf("%d", bit.getBit());
		}
		printf("\n");
	}
	printf("\nResetting the period now\n");
	clock.setPeriod(12);
	for(int i = 0; i < 5; i++)
	{
		for(int j = 0; j < 12; j++)
		{
			clock.run();
			printf("%d", bit.getBit());
		}
		printf("\n");
	}
	//Now do the monitor testing instead...
	

	printf("\nFinished testing\n");

	return 0;
}
